from config.Detail import Detail
from config.List import List
from config.Login import Login
from config.Output import Output
from config.Search import Search
from utils.YygeUtils import *
from get404.Get404 import Get404
import json
import sys
class Config():
    login:Login({})
    list:List({})
    detail:Detail({})
    search:Search({})
    output:Output({})
    def __init__(self):
        print("PythonVersion:"+sys.version)  # 打印PY版本
        self.config_dict = json.loads(YygeUtils.getText("\config\config.json"))
        self.login = Login(self.config_dict["login"])
        self.list = List(self.config_dict["list"])
        self.detail = Detail(self.config_dict["detail"])
        self.search = Search(self.config_dict["search"])
        self.output = Output(self.config_dict["output"])

        # 反爬校验规则设置
        self.detail.get404=Get404()

        # self.list = self.list(self.config_dict["list"])
        # self.detail = self.detail(self.config_dict["detail"])
